//---------------------------------------------DRAW SCANMODE-------------------------------------------------------------------------------------------------
void DrawScanmode(){

  tft.setCursor(34,34);
  tft.setTextSize(3);

  if (ScanMode == 5){
    leds[1] = CRGB(40,40,40); FastLED.show(); //Status LED White
    tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK);
    tft.print("Scan Mode: LUM ");
    tft.setTextSize(2);tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK);
    tft.setCursor(25,115);tft.print("    LUX: ");
    tft.setCursor(25,135);tft.print("    VIS: ");
    tft.setCursor(25,155);tft.print("     IR: ");
    tft.setCursor(25,175);tft.print("     UV: ");
    tft.setCursor(25,195);tft.print("UVIndex: ");
  }
  else if (ScanMode == 1){
    leds[1] = CRGB(5,40,70); FastLED.show(); //Cyan
    tft.setTextColor(ILI9341_CYAN, ILI9341_BLACK);
    tft.print("Scan Mode: ATM ");
      tft.setTextSize(2);tft.setTextColor(ILI9341_CYAN, ILI9341_BLACK);
      //tft.setCursor(25,115);tft.print("GRID Max: ");
      //tft.setCursor(25,135);tft.print("GRID Avg: ");
      tft.setCursor(25,95);tft.print("Target A: ");
      tft.setCursor(25,115);tft.print("Target D: ");
      tft.setCursor(25,135);tft.print("Temp Avg: ");
      tft.setCursor(25,155);tft.print("Pressure: ");
      tft.setCursor(25,175);tft.print("Humidity: ");
      tft.drawRect((gridStartX-2), (gridStartY-2), 67, 67, ILI9341_WHITE);
      tft.drawRect((gridStartX+23), (gridStartY+23), 17, 17, ILI9341_WHITE);
      tft.setCursor(250,182);tft.setTextSize(1);tft.setTextColor(ILI9341_CYAN, ILI9341_BLACK);tft.print("-GRIDeye-");
  }
  else if (ScanMode == 3){
    leds[1] = CRGB(60,0,60); FastLED.show(); //Status LED Purple
    tft.setTextColor(ILI9341_PINK, ILI9341_WHITE);
    tft.print("Scan Mode: MAG");
  }
  else if (ScanMode == 0){
    leds[1] = CRGB(85,0,0); FastLED.show(); //Status LED Red
    tft.setTextColor(ILI9341_RED, ILI9341_BLACK);
    tft.print("Scan Mode: MEC ");
  }
  else if (ScanMode == 6){
    tft.setTextColor(ILI9341_GREEN, ILI9341_BLACK);
    leds[1] = CRGB(0,50,0); FastLED.show(); //Status LED Green
    leds[0] = CRGB(0,5,0); FastLED.show(); //COLOR pixel Green low
    tft.print("Scan Mode: RAD ");
  }
  else if (ScanMode == 4){

    // ALT
    
    //tft.setTextColor(ILI9341_BLACK, ILI9341_WHITE);
    //tft.print("Scan Mode: ALTM");
    //  tft.setTextSize(2);
    //  tft.setCursor(268, 11);
    //  if (AltMode == 0){tft.setTextColor(ILI9341_BLACK, ILI9341_WHITE);tft.print("ALTM");AltMode=1;}
    //  else if (AltMode == 1){tft.setTextColor(ILI9341_BLACK, ILI9341_WHITE);tft.print("NORM");AltMode=0;}
    //  ScanMode = OldScanMode;
    //  playTone(1850, 40);

  }
    else if (ScanMode == 7){
    tft.setTextColor(ILI9341_ORANGE, ILI9341_BLACK);
    tft.print("DIAGNOSTIC MODE");
    i2cScan = 0 ;
    DevCount = 0;
    leds[1] = CRGB(60,0,60); FastLED.show(); //COLOR pixel Purple
    leds[0] = CRGB(70,45,0); FastLED.show(); //Status LED Orange
    playTone(1740, 30);
    delay(50);
    playTone(1740, 30);
    delay(50);
    playTone(1740, 140);
  }
  else if (ScanMode == 2){
    leds[1] = CRGB(70,70,0); FastLED.show(); //Status LED White
    tft.setTextColor(ILI9341_YELLOW, ILI9341_BLACK);
    tft.print("Scan Mode: GAS ");
    tft.setTextSize(1);tft.setTextColor(ILI9341_WHITE, ILI9341_BLACK);
    tft.setCursor(20,90);tft.print("  --All measurements in PPM--");
    tft.setCursor(20,115);tft.print("Ammonia----------(NH3): ");
    tft.setCursor(20,125);tft.print("Carbon Monoxide---(CO): ");
    tft.setCursor(20,135);tft.print("Nitrogen Dioxide-(NO2): ");
    tft.setCursor(20,145);tft.print("Propane---------(C3H8): ");
    tft.setCursor(20,155);tft.print("Butane---------(C4H10): ");
    tft.setCursor(20,165);tft.print("Methane----------(CH4): ");
    tft.setCursor(20,175);tft.print("Hydrogen----------(H2): ");
    tft.setCursor(20,185);tft.print("Ethanol-------(C2H5OH): ");
  }
}
